home *** CD-ROM | disk | FTP | other *** search
/ This Disc Bytes! / Power Computing - The Disc 2 - This Disc Bytes.ISO / mac / CodeWarrior 7 Lite for 68K / MacOS Support / Headers / Universal Headers / OCE.h < prev    next >
Text File  |  1995-07-06  |  55KB  |  1,418 lines

  1. /*
  2.      File:        OCE.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment (AOCE) Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __OCE__
  21. #define __OCE__
  22.  
  23. #ifndef REZ
  24.  
  25. #ifndef __ALIASES__
  26. #include <Aliases.h>
  27. #endif
  28. /*    #include <Types.h>                                            */
  29. /*        #include <ConditionalMacros.h>                            */
  30. /*    #include <AppleTalk.h>                                        */
  31. /*        #include <OSUtils.h>                                    */
  32. /*            #include <MixedMode.h>                                */
  33. /*            #include <Memory.h>                                    */
  34. /*    #include <Files.h>                                            */
  35. /*        #include <Finder.h>                                        */
  36.  
  37. #ifndef __APPLEEVENTS__
  38. #include <AppleEvents.h>
  39. #endif
  40. /*    #include <Errors.h>                                            */
  41. /*    #include <Events.h>                                            */
  42. /*        #include <Quickdraw.h>                                    */
  43. /*            #include <QuickdrawText.h>                            */
  44. /*    #include <EPPC.h>                                            */
  45. /*        #include <PPCToolbox.h>                                    */
  46. /*        #include <Processes.h>                                    */
  47. /*    #include <Notification.h>                                    */
  48.  
  49. #ifndef __SCRIPT__
  50. #include <Script.h>
  51. #endif
  52. /*    #include <IntlResources.h>                                    */
  53.  
  54. #ifndef __TYPES__
  55. #include <Types.h>
  56. #endif
  57.  
  58. #ifdef __cplusplus
  59. extern "C" {
  60. #endif
  61.  
  62. #if PRAGMA_ALIGN_SUPPORTED
  63. #pragma options align=mac68k
  64. #endif
  65.  
  66. #if PRAGMA_IMPORT_SUPPORTED
  67. #pragma import on
  68. #endif
  69.  
  70. /* All utility routines defined here are callable at interrupt level. */
  71. /* Trap selectors */
  72. #define kOCECopyCreationID 768
  73. #define kOCECopyDirDiscriminator 769
  74. #define kOCECopyLocalRecordID 770
  75. #define kOCECopyPackedDSSpec 771
  76. #define kOCECopyPackedPathName 772
  77. #define kOCECopyPackedRLI 773
  78. #define kOCECopyPackedRecordID 774
  79. #define kOCECopyRLI 775
  80. #define kOCECopyRString 776
  81. #define kOCECopyRecordID 777
  82. #define kOCECopyShortRecordID 778
  83. #define kOCEDuplicateRLI 779
  84. #define kOCEEqualCreationID 780
  85. #define kOCEEqualDirDiscriminator 781
  86. #define kOCEEqualDSSpec 782
  87. #define kOCEEqualLocalRecordID 783
  88. #define kOCEEqualPackedDSSpec 784
  89. #define kOCEEqualPackedPathName 785
  90. #define kOCEEqualPackedRecordID 786
  91. #define kOCEEqualPackedRLI 787
  92. #define kOCEEqualRecordID 788
  93. #define kOCEEqualRLI 789
  94. #define kOCEEqualRString 790
  95. #define kOCEEqualShortRecordID 791
  96. #define kOCEExtractAlias 792
  97. #define kOCEGetDSSpecInfo 793
  98. #define kOCEGetIndAttributeType 794
  99. #define kOCEGetIndRecordType 795
  100. #define kOCEGetXtnType 796
  101. #define kOCEIsNullPackedPathName 797
  102. #define kOCENewLocalRecordID 798
  103. #define kOCENewRLI 799
  104. #define kOCENewRecordID 800
  105. #define kOCENewShortRecordID 801
  106. #define kOCEPackDSSpec 802
  107. #define kOCEPackPathName 803
  108. #define kOCEPackRLI 804
  109. #define kOCEPackRLIParts 805
  110. #define kOCEPackRecordID 806
  111. #define kOCEPackedDSSpecSize 807
  112. #define kOCEPackedPathNameSize 808
  113. #define kOCEPackedRLIPartsSize 809
  114. #define kOCEPackedRLISize 810
  115. #define kOCEPackedRecordIDSize 811
  116. #define kOCEDNodeNameCount 812
  117. #define kOCERelRString 813
  118. #define kOCESetCreationIDtoNull 814
  119. #define kOCEUnpackDSSpec 815
  120. #define kOCEUnpackPathName 816
  121. #define kOCEUnpackRLI 817
  122. #define kOCEUnpackRecordID 818
  123. #define kOCEValidPackedDSSpec 819
  124. #define kOCEValidPackedPathName 820
  125. #define kOCEValidPackedRecordID 821
  126. #define kOCEValidPackedRLI 822
  127. #define kOCEValidRLI 823
  128. #define kOCEValidRString 824
  129. #define kOCECToRString 825
  130. #define kOCEPToRString 826
  131. #define kOCERToPString 827
  132. #define kOCEPathFinderCID 828
  133. #define kOCEStreamPackedDSSpec 829
  134. #define kOCENullCID 836
  135. #define kOCEGetAccessControlDSSpec 837
  136. #define kOCEGetRootPackedRLI 838
  137. typedef unsigned short OCERecordTypeIndex;
  138.  
  139. typedef unsigned short OCEAttributeTypeIndex;
  140.  
  141. #endif /* REZ */
  142. /* For anyone who absolutely needs a define of the body of the standard record or
  143. attribute type, use these below.  CAUTION!  All the types below are assumed to be
  144. in character set 'smRoman'.  If you try to compare these to some RString or
  145. AttributeType variable, you must take the character set code into account.  Future
  146. standard types may be defined using character sets other than 'smRoman'. */
  147. /*
  148. All these standard definitions begin with the Apple symbol (not shown here).
  149.  
  150. NOTE:  To access these, you must call OCEGetIndRecordType or OCEGetIndAttributeType
  151. with the proper index.  These routines return pointers to the standard type.
  152. This was done so that code fragments (INITs, CDEVs, CSAMs, etc). which cannot
  153. use global data can also use these.
  154. */
  155. /* Indices for the standard definitions for certain record types (OCERecordTypeIndex): */
  156. #define kUserRecTypeNum 1
  157. #define kGroupRecTypeNum 2
  158. #define kMnMRecTypeNum 3
  159. #define kMnMForwarderRecTypeNum 4
  160. #define kNetworkSpecRecTypeNum 5
  161. #define kADAPServerRecTypeNum 6
  162. #define kADAPDNodeRecTypeNum 7
  163. #define kADAPDNodeRepRecTypeNum 8
  164. #define kServerSetupRecTypeNum 9
  165. #define kDirectoryRecTypeNum 10
  166. #define kDNodeRecTypeNum 11
  167. #define kSetupRecTypeNum 12
  168. #define kMSAMRecTypeNum 13
  169. #define kDSAMRecTypeNum 14
  170. #define kAttributeValueRecTypeNum 15
  171. #define kBusinessCardRecTypeNum 16
  172. #define kMailServiceRecTypeNum 17
  173. #define kCombinedRecTypeNum 18
  174. #define kOtherServiceRecTypeNum 19
  175. #define kAFPServiceRecTypeNum 20
  176. #define kFirstOCERecTypeNum kUserRecTypeNum
  177. #define kLastOCERecTypeNum kAFPServiceRecTypeNum
  178. #define kNumOCERecTypes (kLastOCERecTypeNum - kFirstOCERecTypeNum + 1)
  179. /* Indices for the standard definitions for certain attribute types (OCEAttributeTypeIndex): */
  180. #define kMemberAttrTypeNum 1001
  181. #define kAdminsAttrTypeNum 1002
  182. #define kMailSlotsAttrTypeNum 1003
  183. #define kPrefMailAttrTypeNum 1004
  184. #define kAddressAttrTypeNum 1005
  185. #define kPictureAttrTypeNum 1006
  186. #define kAuthKeyAttrTypeNum 1007
  187. #define kTelephoneAttrTypeNum 1008
  188. #define kNBPNameAttrTypeNum 1009
  189. #define kQMappingAttrTypeNum 1010
  190. #define kDialupSlotAttrTypeNum 1011
  191. #define kHomeNetAttrTypeNum 1012
  192. #define kCoResAttrTypeNum 1013
  193. #define kFwdrLocalAttrTypeNum 1014
  194. #define kConnectAttrTypeNum 1015
  195. #define kForeignAttrTypeNum 1016
  196. #define kOwnersAttrTypeNum 1017
  197. #define kReadListAttrTypeNum 1018
  198. #define kWriteListAttrTypeNum 1019
  199. #define kDescriptorAttrTypeNum 1020
  200. #define kCertificateAttrTypeNum 1021
  201. #define kMsgQsAttrTypeNum 1022
  202. #define kPrefMsgQAttrTypeNum 1023
  203. #define kMasterPFAttrTypeNum 1024
  204. #define kMasterNetSpecAttrTypeNum 1025
  205. #define kServersOfAttrTypeNum 1026
  206. #define kParentCIDAttrTypeNum 1027
  207. #define kNetworkSpecAttrTypeNum 1028
  208. #define kLocationAttrTypeNum 1029
  209. #define kTimeSvrTypeAttrTypeNum 1030
  210. #define kUpdateTimerAttrTypeNum 1031
  211. #define kShadowsOfAttrTypeNum 1032
  212. #define kShadowServerAttrTypeNum 1033
  213. #define kTBSetupAttrTypeNum 1034
  214. #define kMailSetupAttrTypeNum 1035
  215. #define kSlotIDAttrTypeNum 1036
  216. #define kGatewayFileIDAttrTypeNum 1037
  217. #define kMailServiceAttrTypeNum 1038
  218. #define kStdSlotInfoAttrTypeNum 1039
  219. #define kAssoDirectoryAttrTypeNum 1040
  220. #define kDirectoryAttrTypeNum 1041
  221. #define kDirectoriesAttrTypeNum 1042
  222. #define kSFlagsAttrTypeNum 1043
  223. #define kLocalNameAttrTypeNum 1044
  224. #define kLocalKeyAttrTypeNum 1045
  225. #define kDirUserRIDAttrTypeNum 1046
  226. #define kDirUserKeyAttrTypeNum 1047
  227. #define kDirNativeNameAttrTypeNum 1048
  228. #define kCommentAttrTypeNum 1049
  229. #define kRealNameAttrTypeNum 1050
  230. #define kPrivateDataAttrTypeNum 1051
  231. #define kDirTypeAttrTypeNum 1052
  232. #define kDSAMFileAliasAttrTypeNum 1053
  233. #define kCanAddressToAttrTypeNum 1054
  234. #define kDiscriminatorAttrTypeNum 1055
  235. #define kAliasAttrTypeNum 1056
  236. #define kParentMSAMAttrTypeNum 1057
  237. #define kParentDSAMAttrTypeNum 1058
  238. #define kSlotAttrTypeNum 1059
  239. #define kAssoMailServiceAttrTypeNum 1060
  240. #define kFakeAttrTypeNum 1061
  241. #define kInheritSysAdminAttrTypeNum 1062
  242. #define kPreferredPDAttrTypeNum 1063
  243. #define kLastLoginAttrTypeNum 1064
  244. #define kMailerAOMStateAttrTypeNum 1065
  245. #define kMailerSendOptionsAttrTypeNum 1066
  246. #define kJoinedAttrTypeNum 1067
  247. #define kUnconfiguredAttrTypeNum 1068
  248. #define kVersionAttrTypeNum 1069
  249. #define kLocationNamesAttrTypeNum 1070
  250. #define kActiveAttrTypeNum 1071
  251. #define kDeleteRequestedAttrTypeNum 1072
  252. #define kGatewayTypeAttrTypeNum 1073
  253. #define kFirstOCEAttrTypeNum kMemberAttrTypeNum
  254. #define kLastOCEAttrTypeNum kGatewayTypeAttrTypeNum
  255. #define kNumOCEAttrTypes (kLastOCEAttrTypeNum - kFirstOCEAttrTypeNum + 1)
  256. /* Standard definitions for certain record types: */
  257. #define kUserRecTypeBody "aoce User"
  258. #define kGroupRecTypeBody "aoce Group"
  259. #define kMnMRecTypeBody "aoce AppleMail™ M&M"
  260. #define kMnMForwarderRecTypeBody "aoce AppleMail™ Fwdr"
  261. #define kNetworkSpecRecTypeBody "aoce NetworkSpec"
  262. #define kADAPServerRecTypeBody "aoce ADAP Server"
  263. #define kADAPDNodeRecTypeBody "aoce ADAP DNode"
  264. #define kADAPDNodeRepRecTypeBody "aoce ADAP DNode Rep"
  265. #define kServerSetupRecTypeBody "aoce Server Setup"
  266. #define kDirectoryRecTypeBody "aoce Directory"
  267. #define kDNodeRecTypeBody "aoce DNode"
  268. #define kSetupRecTypeBody "aoce Setup"
  269. #define kMSAMRecTypeBody "aoce MSAM"
  270. #define kDSAMRecTypeBody "aoce DSAM"
  271. #define kAttributeValueRecTypeBody "aoce Attribute Value"
  272. #define kBusinessCardRecTypeBody "aoce Business Card"
  273. #define kMailServiceRecTypeBody "aoce Mail Service"
  274. #define kCombinedRecTypeBody "aoce Combined"
  275. #define kOtherServiceRecTypeBody "aoce Other Service"
  276. #define kAFPServiceRecTypeBody "aoce Other Service afps"
  277. /* Standard definitions for certain attribute types: */
  278. #define kMemberAttrTypeBody "aoce Member"
  279. #define kAdminsAttrTypeBody "aoce Administrators"
  280. #define kMailSlotsAttrTypeBody "aoce mailslots"
  281. #define kPrefMailAttrTypeBody "aoce pref mailslot"
  282. #define kAddressAttrTypeBody "aoce Address"
  283. #define kPictureAttrTypeBody "aoce Picture"
  284. #define kAuthKeyAttrTypeBody "aoce auth key"
  285. #define kTelephoneAttrTypeBody "aoce Telephone"
  286. #define kNBPNameAttrTypeBody "aoce NBP Name"
  287. #define kQMappingAttrTypeBody "aoce ForwarderQMap"
  288. #define kDialupSlotAttrTypeBody "aoce DialupSlotInfo"
  289. #define kHomeNetAttrTypeBody "aoce Home Internet"
  290. #define kCoResAttrTypeBody "aoce Co-resident M&M"
  291. #define kFwdrLocalAttrTypeBody "aoce FwdrLocalRecord"
  292. #define kConnectAttrTypeBody "aoce Connected To"
  293. #define kForeignAttrTypeBody "aoce Foreign RLIs"
  294. #define kOwnersAttrTypeBody "aoce Owners"
  295. #define kReadListAttrTypeBody "aoce ReadList"
  296. #define kWriteListAttrTypeBody "aoce WriteList"
  297. #define kDescriptorAttrTypeBody "aoce Descriptor"
  298. #define kCertificateAttrTypeBody "aoce Certificate"
  299. #define kMsgQsAttrTypeBody "aoce MessageQs"
  300. #define kPrefMsgQAttrTypeBody "aoce PrefMessageQ"
  301. #define kMasterPFAttrTypeBody "aoce MasterPF"
  302. #define kMasterNetSpecAttrTypeBody "aoce MasterNetSpec"
  303. #define kServersOfAttrTypeBody "aoce Servers Of"
  304. #define kParentCIDAttrTypeBody "aoce Parent CID"
  305. #define kNetworkSpecAttrTypeBody "aoce NetworkSpec"
  306. #define kLocationAttrTypeBody "aoce Location"
  307. #define kTimeSvrTypeAttrTypeBody "aoce TimeServer Type"
  308. #define kUpdateTimerAttrTypeBody "aoce Update Timer"
  309. #define kShadowsOfAttrTypeBody "aoce Shadows Of"
  310. #define kShadowServerAttrTypeBody "aoce Shadow Server"
  311. #define kTBSetupAttrTypeBody "aoce TB Setup"
  312. #define kMailSetupAttrTypeBody "aoce Mail Setup"
  313. #define kSlotIDAttrTypeBody "aoce SlotID"
  314. #define kGatewayFileIDAttrTypeBody "aoce Gateway FileID"
  315. #define kMailServiceAttrTypeBody "aoce Mail Service"
  316. #define kStdSlotInfoAttrTypeBody "aoce Std Slot Info"
  317. #define kAssoDirectoryAttrTypeBody "aoce Asso. Directory"
  318. #define kDirectoryAttrTypeBody "aoce Directory"
  319. #define kDirectoriesAttrTypeBody "aoce Directories"
  320. #define kSFlagsAttrTypeBody "aoce SFlags"
  321. #define kLocalNameAttrTypeBody "aoce Local Name"
  322. #define kLocalKeyAttrTypeBody "aoce Local Key"
  323. #define kDirUserRIDAttrTypeBody "aoce Dir User RID"
  324. #define kDirUserKeyAttrTypeBody "aoce Dir User Key"
  325. #define kDirNativeNameAttrTypeBody "aoce Dir Native Name"
  326. #define kCommentAttrTypeBody "aoce Comment"
  327. #define kRealNameAttrTypeBody "aoce Real Name"
  328. #define kPrivateDataAttrTypeBody "aoce Private Data"
  329. #define kDirTypeAttrTypeBody "aoce Directory Type"
  330. #define kDSAMFileAliasAttrTypeBody "aoce DSAM File Alias"
  331. #define kCanAddressToAttrTypeBody "aoce Can Address To"
  332. #define kDiscriminatorAttrTypeBody "aoce Discriminator"
  333. #define kAliasAttrTypeBody "aoce Alias"
  334. #define kParentMSAMAttrTypeBody "aoce Parent MSAM"
  335. #define kParentDSAMAttrTypeBody "aoce Parent DSAM"
  336. #define kSlotAttrTypeBody "aoce Slot"
  337. #define kAssoMailServiceAttrTypeBody "aoce Asso. Mail Service"
  338. #define kFakeAttrTypeBody "aoce Fake"
  339. #define kInheritSysAdminAttrTypeBody "aoce Inherit SysAdministrators"
  340. #define kPreferredPDAttrTypeBody "aoce Preferred PD"
  341. #define kLastLoginAttrTypeBody "aoce Last Login"
  342. #define kMailerAOMStateAttrTypeBody "aoce Mailer AOM State"
  343. #define kMailerSendOptionsAttrTypeBody "aoce Mailer Send Options"
  344. #define kJoinedAttrTypeBody "aoce Joined"
  345. #define kUnconfiguredAttrTypeBody "aoce Unconfigured"
  346. #define kVersionAttrTypeBody "aoce Version"
  347. #define kLocationNamesAttrTypeBody "aoce Location Names"
  348. #define kActiveAttrTypeBody "aoce Active"
  349. #define kDeleteRequestedAttrTypeBody "aoce Delete Requested"
  350. #define kGatewayTypeAttrTypeBody "aoce Gateway Type"
  351. #ifndef REZ
  352. /* Miscellaneous enums: */
  353.  
  354. enum {
  355.     kRString32Size                = 32,                            /* max size of the body field in RString32 */
  356.     kRString64Size                = 64,                            /* max size of the body field in RString64 */
  357.     kNetworkSpecMaxBytes        = 32,                            /* max size of the body field in NetworkSpec */
  358.     kPathNameMaxBytes            = 1024,                            /* max size of the data field in PackedPathName */
  359.     kDirectoryNameMaxBytes        = 32,                            /* max size of the body field in DirectoryName */
  360.     kAttributeTypeMaxBytes        = 32,                            /* max size of the body field in AttributeType */
  361.     kAttrValueMaxBytes            = 65536,                        /* max size of any attribute value */
  362.     kRStringMaxBytes            = 256,                            /* max size (in bytes) of the body field of a recordName or recordType */
  363.     kRStringMaxChars            = 128                            /* max size (in chars) of the body field of a recordName or recordType */
  364. };
  365.  
  366. enum {
  367.     kNULLDNodeNumber            = 0,                            /* Special value meaning none specified */
  368.     kRootDNodeNumber            = 2                                /* DNodeNum corresponding to the root of the tree */
  369. };
  370.  
  371. /* This enum is used to select the kind of RString in calls such as OCERelRString,
  372. OCEEqualRString, and OCEValidRString.
  373.  
  374. eGenericSensitive and eGenericInsensitive are enumerators that can be used if you
  375. use RStrings for things other than what you see in this file.  If you want them to
  376. be compared in a case- and diacritical-sensitive manner (c ≠ C ≠ ç), use
  377. eGenericSensitive.  If you want them to be compared in a case- and diacritical-
  378. insensitive manner (c = C = ç), use eGenericInensitive.
  379. WARNING:  do not use eGenericSensitive and eGenericInsensitive with catalog
  380. names, entity names, pathname parts, entity types, network specs, or attribute
  381. types!  Don't assume that you know how they should be compared!!! */
  382. enum {
  383.     kOCEDirName                    = 0,
  384.     kOCERecordOrDNodeName        = 1,
  385.     kOCERecordType                = 2,
  386.     kOCENetworkSpec                = 3,
  387.     kOCEAttrType                = 4,
  388.     kOCEGenericSensitive        = 5,
  389.     kOCEGenericInsensitive        = 6
  390. };
  391.  
  392. typedef unsigned short RStringKind;
  393.  
  394. /* Values for the signature field in Discriminator */
  395.  
  396. enum {
  397.     kDirAllKinds                = 0,
  398.     kDirADAPKind                = 'adap',
  399.     kDirPersonalDirectoryKind    = 'pdir',
  400.     kDirDSAMKind                = 'dsam'
  401. };
  402.  
  403. typedef unsigned long OCEDirectoryKind;
  404.  
  405. /* Values returned by GetDSSpecInfo() */
  406.  
  407. enum {
  408.     kOCEInvalidDSSpec            = 0x3F3F3F3FL,                    /* could not be determined */
  409.     kOCEDirsRootDSSpec            = 'root',                        /* root of all catalogs ("Catalogs" icon) */
  410.     kOCEDirectoryDSSpec            = 'dire',                        /* catalog */
  411.     kOCEDNodeDSSpec                = 'dnod',                        /* d-node */
  412.     kOCERecordDSSpec            = 'reco',                        /* record */
  413.     kOCEentnDSSpec                = 'entn',                        /* extensionType is 'entn' */
  414.     kOCENOTentnDSSpec            = 'not '
  415. };
  416.  
  417. /* Values for AttributeTag */
  418. enum {
  419.     typeRString                    = 'rstr',
  420.     typePackedDSSpec            = 'dspc',
  421.     typeBinary                    = 'bnry'
  422. };
  423.  
  424. /* Bit flag corresponding to the canContainRecords bit.  Use it like this:
  425.     if (foo & kCanContainRecords)
  426.         then this dNode can contain records!
  427. kForeignNode is used to indicate nodes in the name hierarchy that correspond to
  428. foreign catalogs (meaning ADAP sees no clusters or DNodes beneath it, but
  429. mail routers might be able to route to clusters beneath it. */
  430. enum {
  431.     kCanContainRecordsBit,
  432.     kForeignNodeBit
  433. };
  434.  
  435. /* DirNodeKind */
  436. enum {
  437.     kCanContainRecords            = 1L << kCanContainRecordsBit,
  438.     kForeignNode                = 1L << kForeignNodeBit
  439. };
  440.  
  441. typedef unsigned long DirNodeKind;
  442.  
  443. /**** Toolbox Control ****/
  444. /* We will have a version number and attributes for toolboxes off the aa5e trap
  445. and the S&F server trap.
  446.  
  447. This includes the OCE toolbox and S&F Server.  [Note: the S&F server will
  448. change to ONLY service ServerGateway calls —it will then be necessary to run
  449. it co–resident with an OCE toolbox].
  450.  
  451. The high order word will represent the S&F Server version number.  The low
  452. order word will represent the OCE toolbox version number.  These will be zero
  453. until the component is up and running.  It is not possible to know these
  454. a–priori. Note: there will not be a seperate version numbers for each component
  455. in the OCE toolbox or S&F server.
  456.  
  457. The above is consistent with the standard System 7.0 usage of Gestalt.
  458.  
  459. The oce tb attribute gestaltOCETBPresent implies the existence of OCE on a
  460. machine.
  461.  
  462. The OCE TB attribute gestaltOCETBAvailable implies the availablity of OCE calls.
  463.  
  464. The attribute gestaltOCESFServerAvailable implies the availablity of OCE calls
  465. available through the S&F server. This are essentially the server gateway calls.
  466.  
  467. Any (future) remaining OCE attributes may not be established correctly until
  468. the attribute gestaltOCETBAvailable is set.
  469.  
  470. The gestalt selectors and values are listed below: */
  471.  
  472. enum {
  473.     gestaltOCEToolboxVersion    = 'ocet',                        /* OCE Toolbox version */
  474.     gestaltOCEToolboxAttr        = 'oceu'
  475. };
  476.  
  477. enum {
  478. /* version includes:
  479.  *  dirtb
  480.  *  authtb
  481.  *  mailtb
  482.  *  ipmtb
  483.  *  personal catalog
  484.  *  ADSPSecure
  485.  * e.g. all interfaces dependent on the aa5e trap. */
  486.     gestaltOCETB                = 0x0102,                        /* OCE Toolbox version 1.02 */
  487.     gestaltSFServer                = 0x0100,                        /* S&F Server version 1.0 */
  488.     gestaltOCETBPresent            = 0x01,                            /* OCE toolbox is present, not running */
  489.     gestaltOCETBAvailable        = 0x02,                            /* OCE toolbox is running and available */
  490.     gestaltOCESFServerAvailable    = 0x04,                            /* S&F Server is running and available */
  491.     gestaltOCETBNativeGlueAvailable = 0x10                        /* Native PowerPC Glue routines are availible */
  492. };
  493.  
  494. /*    Constants used for Transitions. */
  495. enum {
  496.     ATTransIPMStart                = 'ipms',
  497.     ATTransIPMShutdown            = 'ipmd',
  498.     ATTransDirStart                = 'dirs',
  499.     ATTransDirShutdown            = 'dird',
  500.     ATTransAuthStart            = 'auts',
  501.     ATTransAuthShutdown            = 'autd',
  502.     ATTransSFStart                = 's&fs',
  503.     ATTransSFShutdown            = 's&fd'
  504. };
  505.  
  506. /* Some definitions for time-related parameters: */
  507. /* Interpreted as UTC seconds since 1/1/1904 */
  508. typedef unsigned long UTCTime;
  509.  
  510. /* seconds EAST of Greenwich */
  511. typedef long UTCOffset;
  512.  
  513. /* This is the same as the ScriptManager script. */
  514. typedef short CharacterSet;
  515.  
  516. /**** RString ****/
  517. /* struct RString is a maximum-sized structure.  Allocate one of these and it will
  518. hold any valid RString. */
  519. #define RStringHeader             \
  520.     CharacterSet charSet;            \
  521.     unsigned short dataLength;
  522. struct RString {
  523.     CharacterSet                    charSet;
  524.     unsigned short                    dataLength;
  525.     Byte                            body[kRStringMaxBytes];        /* place for characters */
  526. };
  527.  
  528. typedef struct RString RString;
  529.  
  530. /* struct ProtoRString is a minimum-sized structure.  Use this for a variable-length RString. */
  531. struct ProtoRString {
  532.     CharacterSet                    charSet;
  533.     unsigned short                    dataLength;
  534. };
  535.  
  536. typedef struct ProtoRString ProtoRString;
  537.  
  538. typedef RString *RStringPtr, **RStringHandle;
  539.  
  540. typedef ProtoRString *ProtoRStringPtr;
  541.  
  542. struct RString64 {
  543.     CharacterSet                    charSet;
  544.     unsigned short                    dataLength;
  545.     Byte                            body[kRString64Size];
  546. };
  547.  
  548. typedef struct RString64 RString64;
  549.  
  550. struct RString32 {
  551.     CharacterSet                    charSet;
  552.     unsigned short                    dataLength;
  553.     Byte                            body[kRString32Size];
  554. };
  555.  
  556. typedef struct RString32 RString32;
  557.  
  558. /* Standard definitions for the entity type field and attribute type
  559. have been moved to the end of the file. */
  560. /* Copies str1 to str2.  str2Length is the size of str2, excluding header.
  561. A memFull error will be returned if that is not as large as str1->dataLength. */
  562. extern pascal OSErr OCECopyRString(const RString *str1, RString *str2, unsigned short str2Length)
  563.  THREEWORDINLINE(0x303C, 776, 0xAA5C);
  564. /*    Make an RString from a C string.  If the c string is bigger than rStrLength,
  565. only rStrLength bytes will be copied. (rStrLength does not include the header size) */
  566. extern pascal void OCECToRString(const char *cStr, CharacterSet charSet, RString *rStr, unsigned short rStrLength)
  567.  THREEWORDINLINE(0x303C, 825, 0xAA5C);
  568. /*    Make an RString from a Pascal string.  If the Pascal string is bigger than rStrLength,
  569. only rStrLength bytes will be copied. (rStrLength does not include the header size) */
  570. extern pascal void OCEPToRString(ConstStr255Param pStr, CharacterSet charSet, RString *rStr, unsigned short rStrLength)
  571.  THREEWORDINLINE(0x303C, 826, 0xAA5C);
  572. /*    Make a Pascal string from an RString.  It's up to you to check the char set of
  573. the RString, or if the length of the RString is greater than 255 (the Pascal string's
  574. length will simply be the lower byte of the RString's length).  The StringPtr that is
  575. returned will point directly into the RString (no memory will be allocated). */
  576. extern pascal StringPtr OCERToPString(const RString *rStr)
  577.  THREEWORDINLINE(0x303C, 827, 0xAA5C);
  578. /*    Check the relative equality of two RStrings.  Determines if str1 is greater than,
  579. equal to, or less than str2.  Result types for OCERelRString are defined in <OSUtils.h>
  580. (same as for RelString). */
  581. extern pascal short OCERelRString(const void *str1, const void *str2, RStringKind kind)
  582.  THREEWORDINLINE(0x303C, 813, 0xAA5C);
  583. /*    Check for equality of two RStrings. Returns true if equal. */
  584. extern pascal Boolean OCEEqualRString(const void *str1, const void *str2, RStringKind kind)
  585.  THREEWORDINLINE(0x303C, 790, 0xAA5C);
  586. /*    Check the validity of an RString.  Returns true if the RString is valid */
  587. extern pascal Boolean OCEValidRString(const void *str, RStringKind kind)
  588.  THREEWORDINLINE(0x303C, 824, 0xAA5C);
  589. /**** CreationID ****/
  590. struct CreationID {
  591.     unsigned long                    source;                        /* Fields definitions and usage are not defined */
  592.     unsigned long                    seq;
  593. };
  594.  
  595. typedef struct CreationID CreationID;
  596.  
  597. typedef CreationID AttributeCreationID;
  598.  
  599. /* Returns a pointer to a null CreationID . */
  600. extern pascal const CreationID *OCENullCID(void)
  601.  THREEWORDINLINE(0x303C, 836, 0xAA5C);
  602. /* Returns a pointer to a special CreationID used within the PathFinder. */
  603. extern pascal const CreationID *OCEPathFinderCID(void)
  604.  THREEWORDINLINE(0x303C, 828, 0xAA5C);
  605. /* Sets the CreationID to a null value. */
  606. extern pascal void OCESetCreationIDtoNull(CreationID *cid)
  607.  THREEWORDINLINE(0x303C, 814, 0xAA5C);
  608. /* Copies the value of cid1 to cid2. */
  609. extern pascal void OCECopyCreationID(const CreationID *cid1, CreationID *cid2)
  610.  THREEWORDINLINE(0x303C, 768, 0xAA5C);
  611. /* Check the equality of two CreationIDs. */
  612. extern pascal Boolean OCEEqualCreationID(const CreationID *cid1, const CreationID *cid2)
  613.  THREEWORDINLINE(0x303C, 780, 0xAA5C);
  614. /**** NetworkSpec ****/
  615. /* For the record, a NetworkSpec is an RString with a smaller maximum size.
  616. I don't just typedef it to an RString, because I want the definition of the NetworkSpec
  617. struct to contain the max length.  But it should be possible to typecast any
  618. NetworkSpec to an RString and use all the RString utilities on it. */
  619. struct NetworkSpec {
  620.     CharacterSet                    charSet;
  621.     unsigned short                    dataLength;
  622.     Byte                            body[kNetworkSpecMaxBytes];    /* always fixed at the max size */
  623. };
  624.  
  625. typedef struct NetworkSpec NetworkSpec;
  626.  
  627. typedef NetworkSpec *NetworkSpecPtr;
  628.  
  629. /**** PackedPathName ****/
  630. /* struct PackedPathName is a maximum-sized structure.  Allocate one of
  631. these and it will hold any valid packed pathname. */
  632. #define PackedPathNameHeader     \
  633.     unsigned short dataLength;
  634. struct PackedPathName {
  635.     unsigned short                    dataLength;
  636.     Byte                            data[kPathNameMaxBytes - 2];
  637. };
  638.  
  639. typedef struct PackedPathName PackedPathName;
  640.  
  641. /* struct ProtoPackedPathName is a minimum-sized structure.  Use this
  642. for a variable-length packed PathName. */
  643. struct ProtoPackedPathName {
  644.     unsigned short                    dataLength;
  645. };
  646.  
  647. typedef struct ProtoPackedPathName ProtoPackedPathName;
  648.  
  649. typedef PackedPathName *PackedPathNamePtr;
  650.  
  651. typedef ProtoPackedPathName *ProtoPackedPathNamePtr;
  652.  
  653. /*
  654. Copy the contents of path1 to path2.  path2Length is the size of path2, and must
  655. be large enough to hold a copy of path1.  A memFull error will be returned if that
  656. is not the case.
  657. */
  658. extern pascal OSErr OCECopyPackedPathName(const PackedPathName *path1, PackedPathName *path2, unsigned short path2Length)
  659.  THREEWORDINLINE(0x303C, 772, 0xAA5C);
  660. /*
  661. Returns true if packed path pointer is nil, or is of zero length, or is of
  662. length 2 and nParts of zero.
  663. */
  664. extern pascal Boolean OCEIsNullPackedPathName(const PackedPathName *path)
  665.  THREEWORDINLINE(0x303C, 797, 0xAA5C);
  666. /*
  667. OCEUnpackPathName breaks apart the path into its component RStrings, writing string
  668. pointers into the array 'parts', which the client asserts can hold as many as
  669. 'nParts' elements. The number of parts actually found is returned.  Strings are
  670. placed in the array in order from lowest to highest.  The first pathName element
  671. beneath the root appears last.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO
  672. THE PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  673. WITH THE UNPACKED STRUCT AS WELL
  674. */
  675. extern pascal unsigned short OCEUnpackPathName(const PackedPathName *path, RString *parts[], unsigned short nParts)
  676.  THREEWORDINLINE(0x303C, 816, 0xAA5C);
  677. extern pascal unsigned short OCEPackedPathNameSize(const RStringPtr parts[], unsigned short nParts)
  678.  THREEWORDINLINE(0x303C, 808, 0xAA5C);
  679. /* OCEDNodeNameCount returns the number of RStrings contained within the path. */
  680. extern pascal unsigned short OCEDNodeNameCount(const PackedPathName *path)
  681.  THREEWORDINLINE(0x303C, 812, 0xAA5C);
  682. /*
  683. OCEPackPathName packs the parts into the storage provided as 'path'.  path must be
  684. large enough to hold the packed pathname.  A memFull error will be returned if
  685. pathLength is too small.  parts[0] should contain the deepest pathName element,
  686. and parts[nParts - 1] should contain the name of the first pathName element beneath
  687. the root. 
  688. */
  689. extern pascal OSErr OCEPackPathName(const RStringPtr parts[], unsigned short nParts, PackedPathName *path, unsigned short pathLength)
  690.  THREEWORDINLINE(0x303C, 803, 0xAA5C);
  691. /*
  692. Check the equality of two packed paths.
  693. */
  694. extern pascal Boolean OCEEqualPackedPathName(const PackedPathName *path1, const PackedPathName *path2)
  695.  THREEWORDINLINE(0x303C, 785, 0xAA5C);
  696. /*
  697. OCEValidPackedPathName checks that the packed PathName is internally consistent.
  698. Returns true if it's ok.
  699. */
  700. extern pascal Boolean OCEValidPackedPathName(const PackedPathName *path)
  701.  THREEWORDINLINE(0x303C, 820, 0xAA5C);
  702. /**** DirDiscriminator ****/
  703. struct DirDiscriminator {
  704.     OCEDirectoryKind                signature;
  705.     unsigned long                    misc;
  706. };
  707.  
  708. typedef struct DirDiscriminator DirDiscriminator;
  709.  
  710. /* Copies the value of disc1 to disc2. */
  711. extern pascal void OCECopyDirDiscriminator(const DirDiscriminator *disc1, DirDiscriminator *disc2)
  712.  THREEWORDINLINE(0x303C, 769, 0xAA5C);
  713. /* Check the equality of two DirDiscriminators. */
  714. extern pascal Boolean OCEEqualDirDiscriminator(const DirDiscriminator *disc1, const DirDiscriminator *disc2)
  715.  THREEWORDINLINE(0x303C, 781, 0xAA5C);
  716. /*
  717. This structure is called RLI because it really contains all the info you
  718. need to locate a record within the entire name space.  It contains four fields.
  719. The first two are the name of the catalog and a catalog discriminator.  These
  720. two fields are used to indicate to which catalog a given record belongs.  The
  721. discriminator is used to distinguish between two different catalogs that have
  722. the same name.
  723.  
  724. The other two fields in the RLI structure are used to indicate a particular
  725. catalog node within the catalog specified by the directoryName and
  726. discriminator fields.  These fields are exactly analagous to the dirID and
  727. pathname used in HFS.  It is possible to specify a dNode just by dNodeNumber
  728. (pathname is nil), or just by pathname (dNodeNumber is set to kNULLDNodeNumber),
  729. or by a combination of the two.  The latter is called a 'partial pathname', and
  730. while it is valid in the Catalog Manager API, it is not supported by ADAP
  731. catalogs in Release 1.
  732.  
  733. Note that the path parameter does not include the catalog name, but holds
  734. the names of all the nodes on the path to the desired catalog node, starting
  735. with the catalog node and working its way up the tree.
  736. */
  737. /**** RLI ****/
  738. struct DirectoryName {
  739.     CharacterSet                    charSet;
  740.     unsigned short                    dataLength;
  741.     Byte                            body[kDirectoryNameMaxBytes]; /* space for catalog name */
  742. };
  743.  
  744. typedef struct DirectoryName DirectoryName;
  745.  
  746. typedef DirectoryName *DirectoryNamePtr;
  747.  
  748. /* Catalog node number */
  749. typedef unsigned long DNodeNum;
  750.  
  751. struct RLI {
  752.     DirectoryNamePtr                directoryName;                /* pointer to the name of the catalog root */
  753.     DirDiscriminator                discriminator;                /* used to discriminate between dup catalog names */
  754.     DNodeNum                        dNodeNumber;                /* number of the node */
  755.     PackedPathNamePtr                path;                        /* old-style RLI */
  756. };
  757.  
  758. typedef struct RLI RLI;
  759.  
  760. typedef RLI *RLIPtr;
  761.  
  762. /*
  763. Create a new RLI from the catalog name, discriminator, DNode number, and
  764. PackedPathName.  You must allocate the storage for the RLI and pass in a pointer
  765. to it.
  766. */
  767. extern pascal void OCENewRLI(RLI *newRLI, const DirectoryName *dirName, DirDiscriminator *discriminator, DNodeNum dNodeNumber, const PackedPathName *path)
  768.  THREEWORDINLINE(0x303C, 799, 0xAA5C);
  769. /*
  770. Duplicate the contents of rli1 to rli2.  No errors are returned. This
  771. simply copies the pointers to the catalog name and path, wiping out any pointer
  772. that you might have had in there.
  773. */
  774. extern pascal void OCEDuplicateRLI(const RLI *rli1, RLI *rli2)
  775.  THREEWORDINLINE(0x303C, 779, 0xAA5C);
  776. /*
  777. Copy the contents of rli1 to rli2.  rli2 must already contain
  778. pointers to structures large enough to hold copies of the corresponding
  779. fields from rli1.  A memFull error will be returned if that is not the case.
  780. So if you allocate a brand new empty destination, you must at least set up
  781. its length fields.
  782. */
  783. extern pascal OSErr OCECopyRLI(const RLI *rli1, RLI *rli2)
  784.  THREEWORDINLINE(0x303C, 775, 0xAA5C);
  785. /*
  786. Check the equality of two RLIs.  This will take into account differences
  787. in the case and diacriticals of the directoryName and the PathName.
  788. NOTE THAT THIS WILL FAIL IF rli1 CONTAINS A DNODENUMBER AND A NIL PATHNAME,
  789. AND rli2 CONTAINS kNULLDNodeNumber AND A NON-NIL PATHNAME.  IN OTHER WORDS,
  790. THE TWO rlis MUST BE OF THE SAME FORM TO CHECK FOR EQUALITY.
  791. The one exception is that if the pathname is nil, a dNodeNumber of zero and
  792. kRootDNodeNumber will be treated as equal.
  793. */
  794. extern pascal Boolean OCEEqualRLI(const RLI *rli1, const RLI *rli2)
  795.  THREEWORDINLINE(0x303C, 789, 0xAA5C);
  796. /*
  797. Check the validity of an RLI.  This checks that the catalog name length
  798. is within bounds, and the packed pathname (if specified) is valid.
  799. */
  800. extern pascal Boolean OCEValidRLI(const RLI *theRLI)
  801.  THREEWORDINLINE(0x303C, 823, 0xAA5C);
  802. /**** PackedRLI ****/
  803. /*
  804. struct PackedRLI is a maximum-sized structure.  Allocate one of
  805. these and it will hold any valid packed pathname.
  806. */
  807. #define PackedRLIHeader         \
  808.     unsigned short dataLength;
  809.  
  810. enum {
  811.     kRLIMaxBytes                = (sizeof(RString) + sizeof(DirDiscriminator) + sizeof(DNodeNum) + kPathNameMaxBytes)
  812. };
  813.  
  814. struct PackedRLI {
  815.     unsigned short                    dataLength;
  816.     Byte                            data[kRLIMaxBytes];
  817. };
  818.  
  819. typedef struct PackedRLI PackedRLI;
  820.  
  821. /*
  822. struct ProtoPackedRLI is a minimum-sized structure.  Use this
  823. for a variable-length packed RLI.
  824. */
  825. struct ProtoPackedRLI {
  826.     unsigned short                    dataLength;
  827. };
  828.  
  829. typedef struct ProtoPackedRLI ProtoPackedRLI;
  830.  
  831. typedef PackedRLI *PackedRLIPtr;
  832.  
  833. typedef ProtoPackedRLI *ProtoPackedRLIPtr;
  834.  
  835. /*
  836. Copy the contents of prli1 to prli2.  prli2Length is the size of prli2, and must
  837. be large enough to hold a copy of prli1.  A memFull error will be returned if that
  838. is not the case.
  839. */
  840. extern pascal OSErr OCECopyPackedRLI(const PackedRLI *prli1, PackedRLI *prli2, unsigned short prli2Length)
  841.  THREEWORDINLINE(0x303C, 773, 0xAA5C);
  842. /*
  843. OCEUnpackRLI breaks apart the prli into its components, writing pointers into
  844. the rli structure.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE
  845. PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  846. WITH THE UNPACKED STRUCT AS WELL
  847. */
  848. extern pascal void OCEUnpackRLI(const PackedRLI *prli, RLI *theRLI)
  849.  THREEWORDINLINE(0x303C, 817, 0xAA5C);
  850. /*
  851. OCEPackedRLISize computes the number of bytes of memory needed to hold a
  852. PackedRLI manufactured from an RLI.  This length
  853. includes the length of the length field of PackedRLI, so it
  854. is safe to do a NewPtr (OCEPackedRLISize(...)).
  855. */
  856. extern pascal unsigned short OCEPackedRLISize(const RLI *theRLI)
  857.  THREEWORDINLINE(0x303C, 810, 0xAA5C);
  858. /*
  859. OCEPackRLI packs the RLI into the storage provided as 'prli'.  prli must be
  860. large enough to hold the packed RLI.  A memFull error will be returned if
  861. prliLength is too small.
  862. */
  863. extern pascal OSErr OCEPackRLI(const RLI *theRLI, PackedRLI *prli, unsigned short prliLength)
  864.  THREEWORDINLINE(0x303C, 804, 0xAA5C);
  865. /*
  866. OCEPackedRLIPartsSize computes the number of bytes of memory needed to hold a
  867. PackedRLI manufactured from the parts of an RLI.  This length
  868. includes the length of the length field of PackedRLI, so it
  869. is safe to do a NewPtr (OCEPackedRLIPartsSize(...)).
  870. */
  871. extern pascal unsigned short OCEPackedRLIPartsSize(const DirectoryName *dirName, const RStringPtr parts[], unsigned short nParts)
  872.  THREEWORDINLINE(0x303C, 809, 0xAA5C);
  873. /*
  874. OCEPackRLIParts packs the parts of an RLI into the storage provided as 'prli'.
  875. prli must be large enough to hold the packed RLI.  A memFull error will be returned
  876. if prliLength is too small.
  877. */
  878. extern pascal OSErr OCEPackRLIParts(const DirectoryName *dirName, const DirDiscriminator *discriminator, DNodeNum dNodeNumber, const RStringPtr parts[], unsigned short nParts, PackedRLI *prli, unsigned short prliLength)
  879.  THREEWORDINLINE(0x303C, 805, 0xAA5C);
  880. /*
  881. Check the equality of two packed prlis.
  882. */
  883. extern pascal Boolean OCEEqualPackedRLI(const PackedRLI *prli1, const PackedRLI *prli2)
  884.  THREEWORDINLINE(0x303C, 787, 0xAA5C);
  885. /*
  886. Check the validity of a packed RLI.  This checks that the catalog name length
  887. is within bounds, and the packed pathname (if specified) is valid.
  888. */
  889. extern pascal Boolean OCEValidPackedRLI(const PackedRLI *prli)
  890.  THREEWORDINLINE(0x303C, 822, 0xAA5C);
  891. /*
  892. If this packed RLI describes a Personal Catalog, this call will return a pointer
  893. to an alias record that can be used to find the actual file.  Otherwise, it returns nil.
  894. */
  895. extern pascal AliasPtr OCEExtractAlias(const PackedRLI *prli)
  896.  THREEWORDINLINE(0x303C, 792, 0xAA5C);
  897. /*
  898. This call returns a pointer to a packed RLI that represents the "Catalogs" icon, or
  899. the root of all catalogs.  It is used in the CollabPack.
  900. */
  901. extern pascal const PackedRLI *OCEGetDirectoryRootPackedRLI(void)
  902.  THREEWORDINLINE(0x303C, 838, 0xAA5C);
  903. /**** LocalRecordID ****/
  904. struct LocalRecordID {
  905.     CreationID                        cid;
  906.     RStringPtr                        recordName;
  907.     RStringPtr                        recordType;
  908. };
  909.  
  910. typedef struct LocalRecordID LocalRecordID;
  911.  
  912. typedef LocalRecordID *LocalRecordIDPtr;
  913.  
  914. /* Create a LocalRecordID from a name, type, and CreationID */
  915. extern pascal void OCENewLocalRecordID(const RString *recordName, const RString *recordType, const CreationID *cid, LocalRecordID *lRID)
  916.  THREEWORDINLINE(0x303C, 798, 0xAA5C);
  917. /*
  918. Copy LocalRecordID lRID1 to LocalRecordID lRID2.  lRID2 must already contain
  919. pointers to RString structures large enough to hold copies of the corresponding
  920. fields from lRID1.  A memFull error will be returned if that is not the case.
  921. So if you allocate a brand new empty destination, you must at least set up
  922. its length field.
  923. */
  924. extern pascal OSErr OCECopyLocalRecordID(const LocalRecordID *lRID1, LocalRecordID *lRID2)
  925.  THREEWORDINLINE(0x303C, 770, 0xAA5C);
  926. /*
  927. Check the equality of two local RIDs.
  928. */
  929. extern pascal Boolean OCEEqualLocalRecordID(const LocalRecordID *lRID1, const LocalRecordID *lRID2)
  930.  THREEWORDINLINE(0x303C, 783, 0xAA5C);
  931. /**** ShortRecordID ****/
  932. struct ShortRecordID {
  933.     PackedRLIPtr                    rli;
  934.     CreationID                        cid;
  935. };
  936.  
  937. typedef struct ShortRecordID ShortRecordID;
  938.  
  939. typedef ShortRecordID *ShortRecordIDPtr;
  940.  
  941. /* Create a ShortRecordID from an RLI struct and a CreationID */
  942. extern pascal void OCENewShortRecordID(const PackedRLI *theRLI, const CreationID *cid, ShortRecordIDPtr sRID)
  943.  THREEWORDINLINE(0x303C, 801, 0xAA5C);
  944. /*
  945. Copy ShortRecordID sRID1 to ShortRecordID sRID2.  sRID2 must already contain
  946. pointers to structures large enough to hold copies of the corresponding
  947. fields from sRID1.  A memFull error will be returned if that is not the case.
  948. So if you allocate a brand new empty destination, you must at least set up
  949. its length fields.
  950. */
  951. extern pascal OSErr OCECopyShortRecordID(const ShortRecordID *sRID1, ShortRecordID *sRID2)
  952.  THREEWORDINLINE(0x303C, 778, 0xAA5C);
  953. /*
  954. Check the equality of two short RIDs.
  955. */
  956. extern pascal Boolean OCEEqualShortRecordID(const ShortRecordID *sRID1, const ShortRecordID *sRID2)
  957.  THREEWORDINLINE(0x303C, 791, 0xAA5C);
  958. /**** RecordID ****/
  959. struct RecordID {
  960.     PackedRLIPtr                    rli;                        /* pointer to a packed rli structure */
  961.     LocalRecordID                    local;
  962. };
  963.  
  964. typedef struct RecordID RecordID;
  965.  
  966. typedef RecordID *RecordIDPtr;
  967.  
  968. /*    Create a RecordID from a packed RLI struct and a LocalRecordID.
  969. This doesn't allocate any new space; the RecordID points to the same
  970. packed RLI struct and the same name and type RStrings. */
  971. extern pascal void OCENewRecordID(const PackedRLI *theRLI, const LocalRecordID *lRID, RecordID *rid)
  972.  THREEWORDINLINE(0x303C, 800, 0xAA5C);
  973. /*
  974. Copy RecordID RID1 to RecordID RID2.  RID2 must already contain
  975. pointers to structures large enough to hold copies of the corresponding
  976. fields from lRID1.  A memFull error will be returned if that is not the case.
  977. So if you allocate a brand new empty destination, you must at least set up
  978. its length fields.
  979. */
  980. extern pascal OSErr OCECopyRecordID(const RecordID *rid1, const RecordID *rid2)
  981.  THREEWORDINLINE(0x303C, 777, 0xAA5C);
  982. /*    Check the equality of two RIDs. */
  983. extern pascal Boolean OCEEqualRecordID(const RecordID *rid1, const RecordID *rid2)
  984.  THREEWORDINLINE(0x303C, 788, 0xAA5C);
  985. /**** PackedRecordID ****/
  986. /*
  987. struct PackedRecordID is a maximum-sized structure.  Allocate one of
  988. these and it will hold any valid packed RecordID.
  989. */
  990. #define PackedRecordIDHeader     \
  991.     unsigned short dataLength;
  992.  
  993. enum {
  994.     kPackedRecordIDMaxBytes        = (kPathNameMaxBytes + sizeof(DNodeNum) + sizeof(DirDiscriminator) + sizeof(CreationID) + (3 * sizeof(RString)))
  995. };
  996.  
  997. struct PackedRecordID {
  998.     unsigned short                    dataLength;
  999.     Byte                            data[kPackedRecordIDMaxBytes];
  1000. };
  1001.  
  1002. typedef struct PackedRecordID PackedRecordID;
  1003.  
  1004. /*
  1005. struct ProtoPackedRecordID is a minimum-sized structure.  Use this
  1006. for a variable-length packed RecordID.
  1007. */
  1008. struct ProtoPackedRecordID {
  1009.     unsigned short                    dataLength;
  1010. };
  1011.  
  1012. typedef struct ProtoPackedRecordID ProtoPackedRecordID;
  1013.  
  1014. typedef PackedRecordID *PackedRecordIDPtr;
  1015.  
  1016. typedef ProtoPackedRecordID *ProtoPackedRecordIDPtr;
  1017.  
  1018. /*
  1019. Copy PackedRecordID pRID1 to PackedRecordID pRID2.  pRID2 must already contain
  1020. pointers to structures large enough to hold copies of the corresponding
  1021. fields from pRID1.  A memFull error will be returned if that is not the case.
  1022. pRID2Length is the number of bytes that can be put into pRID2, not counting the
  1023. packed RecordID header.
  1024. */
  1025. extern pascal OSErr OCECopyPackedRecordID(const PackedRecordID *pRID1, const PackedRecordID *pRID2, unsigned short pRID2Length)
  1026.  THREEWORDINLINE(0x303C, 774, 0xAA5C);
  1027. /*
  1028. Create a RecordID from a PackedRecordID.
  1029. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  1030. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL
  1031. */
  1032. extern pascal void OCEUnpackRecordID(const PackedRecordID *pRID, RecordID *rid)
  1033.  THREEWORDINLINE(0x303C, 818, 0xAA5C);
  1034. /*
  1035. Create a PackedRecordID from a RecordID.  pRID must be large enough to contain
  1036. the packed RecordID.  A memFull error will be returned if that is not the case.
  1037. packedRecordIDLength is the number of bytes that can be put into pRID, not
  1038. counting the header.
  1039. */
  1040. extern pascal OSErr OCEPackRecordID(const RecordID *rid, PackedRecordID *pRID, unsigned short packedRecordIDLength)
  1041.  THREEWORDINLINE(0x303C, 806, 0xAA5C);
  1042. /*
  1043. Compute the number of bytes of memory needed to hold a RecordID when packed. This
  1044. length includes the length of the length field of PackedRecordID, so it
  1045. is safe to do a NewPtr (OCEPackedRecordIDSize(...)).
  1046. */
  1047. extern pascal unsigned short OCEPackedRecordIDSize(const RecordID *rid)
  1048.  THREEWORDINLINE(0x303C, 811, 0xAA5C);
  1049. /*
  1050. Check the equality of two packed RIDs.
  1051. */
  1052. extern pascal Boolean OCEEqualPackedRecordID(const PackedRecordID *pRID1, const PackedRecordID *pRID2)
  1053.  THREEWORDINLINE(0x303C, 786, 0xAA5C);
  1054. /* OCEValidPackedRecordID checks the validity of a packed record ID. */
  1055. extern pascal Boolean OCEValidPackedRecordID(const PackedRecordID *pRID)
  1056.  THREEWORDINLINE(0x303C, 821, 0xAA5C);
  1057. /**** DSSpec ****/
  1058. struct DSSpec {
  1059.     RecordID                        *entitySpecifier;
  1060.     OSType                            extensionType;
  1061.     unsigned short                    extensionSize;
  1062.     Ptr                                extensionValue;
  1063. };
  1064.  
  1065. typedef struct DSSpec DSSpec;
  1066.  
  1067. typedef DSSpec *DSSpecPtr;
  1068.  
  1069. /*
  1070. struct PackedDSSpec is NOT a maximum-sized structure.  Allocate one of
  1071. these and it will hold any valid packed RecordID, but not necessarily any additional
  1072. data.
  1073. */
  1074. #define PackedDSSpecHeader         \
  1075.     unsigned short dataLength;
  1076.  
  1077. enum {
  1078.     kPackedDSSpecMaxBytes        = (sizeof(PackedRecordID) + sizeof(OSType) + sizeof(UInt16))
  1079. };
  1080.  
  1081. struct PackedDSSpec {
  1082.     unsigned short                    dataLength;
  1083.     Byte                            data[kPackedDSSpecMaxBytes];
  1084. };
  1085.  
  1086. typedef struct PackedDSSpec PackedDSSpec;
  1087.  
  1088. /*
  1089. struct ProtoPackedDSSpec is a minimum-sized structure.  Use this
  1090. for a variable-length packed DSSpec.
  1091. */
  1092. struct ProtoPackedDSSpec {
  1093.     unsigned short                    dataLength;
  1094. };
  1095.  
  1096. typedef struct ProtoPackedDSSpec ProtoPackedDSSpec;
  1097.  
  1098. typedef PackedDSSpec *PackedDSSpecPtr;
  1099.  
  1100. typedef ProtoPackedDSSpec *ProtoPackedDSSpecPtr;
  1101.  
  1102. /*
  1103. Copy PackedDSSpec pdss1 to PackedDSSpec pdss2.  pdss2 must already contain
  1104. pointers to structures large enough to hold copies of the corresponding
  1105. fields from pdss1.  A memFull error will be returned if that is not the case.
  1106. pdss2Length is the number of bytes that can be put into pdss2, not counting the
  1107. packed DSSpec header.
  1108. */
  1109. extern pascal OSErr OCECopyPackedDSSpec(const PackedDSSpec *pdss1, const PackedDSSpec *pdss2, unsigned short pdss2Length)
  1110.  THREEWORDINLINE(0x303C, 771, 0xAA5C);
  1111. /*
  1112. Create a DSSpec from a PackedDSSpec.
  1113. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  1114. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL.
  1115. A pointer to the extension is returned in dss->extensionValue, and the length of that
  1116. extension is returned in dss->extensionSize.  If there is no extension, dss->extensionValue will
  1117. be set to nil.  This routine will unpack the RecordID (if any) into rid, unpack the rest
  1118. into dss, and set dss->entitySpecifier to rid.
  1119. */
  1120. extern pascal void OCEUnpackDSSpec(const PackedDSSpec *pdss, DSSpec *dss, RecordID *rid)
  1121.  THREEWORDINLINE(0x303C, 815, 0xAA5C);
  1122. /*
  1123. Create a PackedDSSpec from a DSSpec.  pdss must be large enough to
  1124. contain the packed RecordID and any extension.  A memFull error will be returned if that
  1125. is not the case.  pdssLength is the number of bytes that can be put into pdss,
  1126. not counting the header.
  1127. */
  1128. extern pascal OSErr OCEPackDSSpec(const DSSpec *dss, PackedDSSpec *pdss, unsigned short pdssLength)
  1129.  THREEWORDINLINE(0x303C, 802, 0xAA5C);
  1130. /*
  1131. Compute the number of bytes of memory needed to hold a DSSpec when packed. This
  1132. length includes the length of the length field of PackedDSSpec, so it
  1133. is safe to do a NewPtr (OCEPackedDSSpecSize(...)).
  1134. */
  1135. extern pascal unsigned short OCEPackedDSSpecSize(const DSSpec *dss)
  1136.  THREEWORDINLINE(0x303C, 807, 0xAA5C);
  1137. /*    Check the equality of two DSSpecs.  This compares all fields, even the
  1138. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1139. diacrit-insensitive manner. */
  1140. extern pascal Boolean OCEEqualDSSpec(const DSSpec *pdss1, const DSSpec *pdss2)
  1141.  THREEWORDINLINE(0x303C, 782, 0xAA5C);
  1142. /*    Check the equality of two PackedDSSpecs.  This compares all fields, even the
  1143. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1144. diacrit-insensitive manner. */
  1145. extern pascal Boolean OCEEqualPackedDSSpec(const PackedDSSpec *pdss1, const PackedDSSpec *pdss2)
  1146.  THREEWORDINLINE(0x303C, 784, 0xAA5C);
  1147. /*
  1148. Check the validity of a PackedDSSpec.  If extensionType is
  1149. 'entn', pdss must contain a valid entitySpecifier.  For all other extensionTypes, a nil
  1150. entitySpecifier is valid, but if non-nil, it will be checked for validity.  No check
  1151. is made on the extension.
  1152. */
  1153. extern pascal Boolean OCEValidPackedDSSpec(const PackedDSSpec *pdss)
  1154.  THREEWORDINLINE(0x303C, 819, 0xAA5C);
  1155. /*
  1156. Return info about a DSSpec.  This routine does not check validity.  If the
  1157. DSSpec has no extension, we determine whether it represents the root of all
  1158. catalogs, a single catalog, a DNode, or a Record.  Else it is invalid.
  1159. If the DSSpec has an extension, we simply return the extension type.
  1160. */
  1161. extern pascal OSType OCEGetDSSpecInfo(const DSSpec *spec)
  1162.  THREEWORDINLINE(0x303C, 793, 0xAA5C);
  1163. /* OCEGetExtensionType returns the extensionType imbedded in the PackedDSSpec. */
  1164. extern pascal OSType OCEGetExtensionType(const PackedDSSpec *pdss)
  1165.  THREEWORDINLINE(0x303C, 796, 0xAA5C);
  1166. /*
  1167. OCEStreamPackedDSSpec streams (flattens) a catalog object a little at a time by
  1168. calling the DSSpecStreamer routine that you provide.
  1169. */
  1170. typedef pascal OSErr (*DSSpecStreamerProcPtr)(void *buffer, unsigned long count, Boolean eof, long userData);
  1171.  
  1172. #if GENERATINGCFM
  1173. typedef UniversalProcPtr DSSpecStreamerUPP;
  1174. #else
  1175. typedef DSSpecStreamerProcPtr DSSpecStreamerUPP;
  1176. #endif
  1177.  
  1178. enum {
  1179.     uppDSSpecStreamerProcInfo = kPascalStackBased
  1180.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  1181.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void*)))
  1182.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned long)))
  1183.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean)))
  1184.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
  1185. };
  1186.  
  1187. #if GENERATINGCFM
  1188. #define NewDSSpecStreamerProc(userRoutine)        \
  1189.         (DSSpecStreamerUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSSpecStreamerProcInfo, GetCurrentArchitecture())
  1190. #else
  1191. #define NewDSSpecStreamerProc(userRoutine)        \
  1192.         ((DSSpecStreamerUPP) (userRoutine))
  1193. #endif
  1194.  
  1195. #if GENERATINGCFM
  1196. #define CallDSSpecStreamerProc(userRoutine, buffer, count, eof, userData)        \
  1197.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDSSpecStreamerProcInfo, (buffer), (count), (eof), (userData))
  1198. #else
  1199. #define CallDSSpecStreamerProc(userRoutine, buffer, count, eof, userData)        \
  1200.         (*(userRoutine))((buffer), (count), (eof), (userData))
  1201. #endif
  1202.  
  1203. typedef DSSpecStreamerUPP DSSpecStreamer;
  1204.  
  1205. extern pascal OSErr OCEStreamPackedDSSpec(const DSSpec *dss, DSSpecStreamer stream, long userData, unsigned long *actualCount)
  1206.  THREEWORDINLINE(0x303C, 829, 0xAA5C);
  1207. /**** AttributeType ****/
  1208. /*
  1209. For the record, an AttributeType is an RString with a smaller maximum size.
  1210. I don't just typedef it to an RString, because I want the definition of the AttributeType
  1211. struct to contain the max length, because I need to include it in the Attribute struct
  1212. below.  But it should be possible to typecast any AttributeType to an RString and use
  1213. all the RString utilities on it.
  1214. */
  1215. struct AttributeType {
  1216.     CharacterSet                    charSet;
  1217.     unsigned short                    dataLength;
  1218.     Byte                            body[kAttributeTypeMaxBytes]; /* always fixed at the max size */
  1219. };
  1220.  
  1221. typedef struct AttributeType AttributeType;
  1222.  
  1223. typedef AttributeType *AttributeTypePtr;
  1224.  
  1225. /* Miscellaneous defines:  (these cannot be made into enums) */
  1226.  
  1227. enum {
  1228.     kMinPackedRStringLength        = (sizeof(ProtoRString))
  1229. };
  1230.  
  1231. enum {
  1232.     kMinPackedRLISize            = (sizeof(ProtoPackedRLI) + sizeof(DirDiscriminator) + sizeof(DNodeNum) + kMinPackedRStringLength + sizeof(ProtoPackedPathName))
  1233. };
  1234.  
  1235. /**** AttributeValue ****/
  1236. /* same class as is used in AppleEvents */
  1237. typedef DescType AttributeTag;
  1238.  
  1239. struct AttributeValue {
  1240.     AttributeTag                    tag;
  1241.     unsigned long                    dataLength;
  1242.     Ptr                                bytes;
  1243. };
  1244.  
  1245. typedef struct AttributeValue AttributeValue;
  1246.  
  1247. typedef AttributeValue *AttributeValuePtr;
  1248.  
  1249. /**** Attribute ****/
  1250. struct Attribute {
  1251.     AttributeType                    attributeType;
  1252.     AttributeCreationID                cid;
  1253.     AttributeValue                    value;
  1254. };
  1255.  
  1256. typedef struct Attribute Attribute;
  1257.  
  1258. typedef Attribute *AttributePtr;
  1259.  
  1260. extern pascal RString *OCEGetIndRecordType(OCERecordTypeIndex stringIndex)
  1261.  THREEWORDINLINE(0x303C, 795, 0xAA5C);
  1262. extern pascal AttributeType *OCEGetIndAttributeType(OCEAttributeTypeIndex stringIndex)
  1263.  THREEWORDINLINE(0x303C, 794, 0xAA5C);
  1264.  
  1265. enum {
  1266.     _oceTBDispatch                = 0xAA5E
  1267. };
  1268.  
  1269. /****************************************************************************************
  1270.    PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
  1271.  
  1272.    OCESizePackedRecipient, OCEPackRecipient, OCEUnpackRecipient, OCEStreamRecipient,
  1273.    OCEGetRecipientType, and OCESetRecipientType have moved to the OCE header file.
  1274.    The OCEMessaging header includes the OCE header, so no changes to your code are
  1275.    required.
  1276.  
  1277. ****************************************************************************************/
  1278. typedef DSSpec OCERecipient;
  1279.  
  1280.  
  1281. enum {
  1282.     kOCESizePackedRecipient        = 830,
  1283.     kOCEPackRecipient            = 831,
  1284.     kOCEUnpackRecipient            = 832,
  1285.     kOCEStreamRecipient            = 833,
  1286.     kOCEGetRecipientType        = 834,
  1287.     kOCESetRecipientType        = 835
  1288. };
  1289.  
  1290. /*
  1291. Compute the space that a OCERecipient would take if it were in packed
  1292. form.  [Note: does NOT even pad extensionSize, so you may get an odd #back out]
  1293. Safe to pass dereferenced handle(s).
  1294. */
  1295. extern pascal unsigned short OCESizePackedRecipient(const OCERecipient *rcpt)
  1296.  THREEWORDINLINE(0x303C, 830, 0xAA5C);
  1297. /*
  1298. Take an OCERecipient (scatter) and (gather) stream into the specified
  1299. buffer.  It is assumed that there is sufficient space in the buffer (that is
  1300. OCESizePackedRecipient).  Safe to pass dereferenced handle(s).
  1301. */
  1302. extern pascal unsigned short OCEPackRecipient(const OCERecipient *rcpt, void *buffer)
  1303.  THREEWORDINLINE(0x303C, 831, 0xAA5C);
  1304. /*
  1305. Take a packed OCERecipient and cast a the OCERecipient frame over it. Returns
  1306. amBadDestId if it doesn't look like an OCERecipient. Safe to pass dereferenced
  1307. handle(s).
  1308. */
  1309. extern pascal OSErr OCEUnpackRecipient(const void *buffer, OCERecipient *rcpt, RecordID *entitySpecifier)
  1310.  THREEWORDINLINE(0x303C, 832, 0xAA5C);
  1311. /*
  1312. Take an OCERecipient (scatter) and (gather) stream using the specified
  1313. function.  Safe to pass dereferenced handle(s).  If streamer function returns
  1314. OCEError OCEStreamRecipient stops execution and passes the error back to the caller
  1315. */
  1316. typedef pascal OSErr (*OCERecipientStreamerProcPtr)(void *buffer, unsigned long count, Boolean eof, long userData);
  1317.  
  1318. #if GENERATINGCFM
  1319. typedef UniversalProcPtr OCERecipientStreamerUPP;
  1320. #else
  1321. typedef OCERecipientStreamerProcPtr OCERecipientStreamerUPP;
  1322. #endif
  1323.  
  1324. enum {
  1325.     uppOCERecipientStreamerProcInfo = kPascalStackBased
  1326.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  1327.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void*)))
  1328.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned long)))
  1329.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean)))
  1330.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
  1331. };
  1332.  
  1333. #if GENERATINGCFM
  1334. #define NewOCERecipientStreamerProc(userRoutine)        \
  1335.         (OCERecipientStreamerUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppOCERecipientStreamerProcInfo, GetCurrentArchitecture())
  1336. #else
  1337. #define NewOCERecipientStreamerProc(userRoutine)        \
  1338.         ((OCERecipientStreamerUPP) (userRoutine))
  1339. #endif
  1340.  
  1341. #if GENERATINGCFM
  1342. #define CallOCERecipientStreamerProc(userRoutine, buffer, count, eof, userData)        \
  1343.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppOCERecipientStreamerProcInfo, (buffer), (count), (eof), (userData))
  1344. #else
  1345. #define CallOCERecipientStreamerProc(userRoutine, buffer, count, eof, userData)        \
  1346.         (*(userRoutine))((buffer), (count), (eof), (userData))
  1347. #endif
  1348.  
  1349. typedef OCERecipientStreamerUPP OCERecipientStreamer;
  1350.  
  1351. extern pascal OSErr OCEStreamRecipient(const OCERecipient *rcpt, OCERecipientStreamer stream, long userData, unsigned long *actualCount)
  1352.  THREEWORDINLINE(0x303C, 833, 0xAA5C);
  1353. /* Get the OCERecipient's extensionType. Safe to pass dereferenced handle(s).*/
  1354. extern pascal OSType OCEGetRecipientType(const CreationID *cid)
  1355.  THREEWORDINLINE(0x303C, 834, 0xAA5C);
  1356. /*
  1357. Set the OCERecipient's extensionType in the specified cid.  (Note: we do NOT
  1358. check for a nil pointer).  If the extensionType is 'entn', the cid is assumed
  1359. to be "valid" and is not touched.  Note: to properly handle non 'entn''s this
  1360. routine must and will zero the high long (source) of the cid! Safe to pass
  1361. dereferenced handle(s).
  1362. */
  1363. extern pascal void OCESetRecipientType(OSType extensionType, CreationID *cid)
  1364.  THREEWORDINLINE(0x303C, 835, 0xAA5C);
  1365. /****************************************************************************************
  1366.    PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
  1367.  
  1368.    OCEGetAccessControlDSSpec and its corresponding data type and constants have
  1369.    moved to the OCE header from OCEAuthDir. The OCEAuthDir header includes the OCE
  1370.    header, so no changes to your code are required.
  1371.    
  1372. ****************************************************************************************/
  1373. /* access categories bit numbers */
  1374.  
  1375. enum {
  1376.     kThisRecordOwnerBit            = 0,
  1377.     kFriendsBit                    = 1,
  1378.     kAuthenticatedInDNodeBit    = 2,
  1379.     kAuthenticatedInDirectoryBit = 3,
  1380.     kGuestBit                    = 4,
  1381.     kMeBit                        = 5
  1382. };
  1383.  
  1384. /* Values of CategoryMask */
  1385. enum {
  1386.     kThisRecordOwnerMask        = (1L << kThisRecordOwnerBit),
  1387.     kFriendsMask                = (1L << kFriendsBit),
  1388.     kAuthenticatedInDNodeMask    = (1L << kAuthenticatedInDNodeBit),
  1389.     kAuthenticatedInDirectoryMask = (1L << kAuthenticatedInDirectoryBit),
  1390.     kGuestMask                    = (1L << kGuestBit),
  1391.     kMeMask                        = (1L << kMeBit)
  1392. };
  1393.  
  1394. typedef unsigned long CategoryMask;
  1395.  
  1396. /*
  1397. pass kThisRecordOwnerMask, kFriendsMask, kAuthenticatedInDNodeMask, kAuthenticatedInDirectoryMask,
  1398. kGuestMask, or kMeMask to this routine, and it will return a pointer to a
  1399. DSSpec that can be used in the Get or Set Access Controls calls.
  1400. */
  1401. extern pascal DSSpec *OCEGetAccessControlDSSpec(CategoryMask categoryBitMask)
  1402.  THREEWORDINLINE(0x303C, 837, 0xAA5C);
  1403.  
  1404. #if PRAGMA_IMPORT_SUPPORTED
  1405. #pragma import off
  1406. #endif
  1407.  
  1408. #if PRAGMA_ALIGN_SUPPORTED
  1409. #pragma options align=reset
  1410. #endif
  1411.  
  1412. #ifdef __cplusplus
  1413. }
  1414. #endif
  1415.  
  1416. #endif /* REZ */
  1417. #endif /* __OCE__ */
  1418.